package com.zch.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zch.dao.ProjectMessageMapper;
import com.zch.dao.model.ProjectMessage;
import com.zch.dao.model.ProjectMessageExample;
import com.zch.daoEx.ProjectAnalyzeMapperEx;
import com.zch.daoEx.ProjectMessageMapperEx;
import com.zch.daoEx.model.ProjectMessageEx;
import com.zch.daoEx.model.ZxMessageEx;

@Service
public class ProjectMessageService {
	@Autowired
	private ProjectMessageMapper projectMessageMapper;
    @Autowired
    private ProjectMessageMapperEx projectMessageMapperEx;	
    @Autowired
    private ProjectAnalyzeMapperEx projectAnalyzeMapperEx;

	public int countByExample(ProjectMessageExample example) {
		return this.projectMessageMapper.countByExample(example);
	}

	public ProjectMessage selectByPrimaryKey(String id) {
		return this.projectMessageMapper.selectByPrimaryKey(id);
	}

	public List<ProjectMessage> selectByExample(ProjectMessageExample example) {
		return this.projectMessageMapper.selectByExample(example);
	}

	public int deleteByPrimaryKey(String id) {
		return this.projectMessageMapper.deleteByPrimaryKey(id);
	}

	public int updateByPrimaryKeySelective(ProjectMessage record) {
		return this.projectMessageMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(ProjectMessage record) {
		return this.projectMessageMapper.updateByPrimaryKey(record);
	}

	public int deleteByExample(ProjectMessageExample example) {
		return this.projectMessageMapper.deleteByExample(example);
	}

	public int updateByExampleSelective(ProjectMessage record, ProjectMessageExample example) {
		return this.projectMessageMapper.updateByExampleSelective(record, example);
	}

	public int updateByExample(ProjectMessage record, ProjectMessageExample example) {
		return this.projectMessageMapper.updateByExample(record, example);
	}

	public int insert(ProjectMessage record) {
		return this.projectMessageMapper.insert(record);
	}

	public int insertSelective(ProjectMessage record) {
		return this.projectMessageMapper.insertSelective(record);
	}

    public List<ProjectMessageEx> selectList(Map<String, Object> map) {
        return this.projectMessageMapperEx.selectList(map);
    }

    public  int updateConnectMaster(String userId,String id) {
            this.projectAnalyzeMapperEx.updateConnectMaster(userId, id);
        return this.projectMessageMapperEx.updateConnectMaster(userId,id);
        
    }

    public ProjectMessageEx selectDetail(String id) {
        return this.projectMessageMapperEx.selectDetail(id);
    }

    public ProjectMessageEx selectIsEnable(String projectId) {
        return this.projectMessageMapperEx.selectIsEnable(projectId);
    }

    public Boolean updateProjectShutdownReason(Map<String, Object> map) {
        return this.projectMessageMapperEx.updateProjectShutdownReason(map);
    }

    public Boolean updateProjectConnectResult(Map<String, Object> map) {
        return this.projectMessageMapperEx.updateProjectConnectResult(map);
    }

    public List<ProjectMessageEx> selectAppListByNormal() {
        return this.projectMessageMapperEx.selectAppListByNormal();
    }

    public List<ProjectMessageEx> selectAppListByInside() {
        return this.projectMessageMapperEx.selectAppListByInside();
    }

    public ProjectMessageEx selectAppDetailByNormal(Map<String, Object> map) {
        return this.projectMessageMapperEx.selectAppDetailByNormal(map);
    }

    public ProjectMessageEx selectAppDetailByInside(Map<String, Object> map) {
        
        return this.projectMessageMapperEx.selectAppDetailByInside(map);        
    }

    public List<ProjectMessage> selectMyProject(Map<String, Object> map) {
        return this.projectMessageMapperEx.selectMyProject(map); 
    }

    public Boolean updateMsg(Map<String, Object> map) {
        return this.projectMessageMapperEx.updateMsg(map); 
    }


}
